Repository navigation
Feature/hw13-ros2 - #13
Conversation
…ller.hpp, implement turrent_controller_node.cpp
… rename width and height to frame_center x/y
yevhenkuznetsov
left a comment
There was a problem hiding this comment.
Сподобалося, як у controller node використано trigger_pending_: прапорець встановлюється до асинхронного виклику сервісу і скидається лише після отримання READY. Це закриває проміжок до оновлення /actuator/status і не допускає повторного trigger. Власні тести також добре покривають граничні координати, confidence threshold, READY та RELOADING.
Після тимчасового виправлення середовища проєкт збирається, усі 33 тести проходять. Far-flyby дає наведення без trigger, low-confidence дає ACTION_IDLE і TRIGGER_SKIP, reload-сценарій переходить від TRIGGER_REQUESTED до TRIGGER_RELOADING без повторного виклику сервісу.
Blocking: devcontainer з PR не збирається. Evidence і перевірений fix: #13 (comment)
Blocking: PR має merge conflicts, GitHub показує CONFLICTING / DIRTY. Потрібно синхронізувати гілку з main та розв’язати конфлікти.
…nto feature/hw13-ros2
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Extends the provided antidrone_turret package with the turret control layer required by the assignment. Adds a ROS-independent decision core, the turret_controller_node, two aiming driver nodes, three new message types, unit tests, and the CMake/launch/YAML wiring. The starter package (target_track_publisher_node, actuator_node, provided interfaces, tracks, and provided_logic_test.cpp) is left untouched.
What was implemented
New message interfaces
Pure C++ logic (no rclcpp) — include/antidrone_turret/turret_controller.hpp
Nodes
Trigger safety
A single fire request per engagement: a trigger_pending_ latch plus the last /actuator/status state prevent duplicate /actuator/trigger calls while the actuator is RELOADING. The latch is cleared once the actuator returns to READY.
Tests — test/turret_controller_test.cpp
At least one test per decision part: target evaluation, servo command, gimbal command, trigger decision (READY → REQUESTED, RELOADING → RELOADING, far → SKIP), and full TurretStatus assembly.
Build / launch / config
CMakeLists.txt: registered the three new interfaces, added executables for the three new nodes (ament_auto), linked cpp_typesupport_target, and added the new gtest target.
system.launch.py: added the three nodes (controller gets parameters=[config]; drivers run without parameters). All nodes honor the log_level argument.
config/sequence.yaml: turret_controller_node parameters (confidence_threshold: 0.8, max_distance_m: 30.0).